/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.ruan.designpatterns.creational.abstractfactory.factories;

import za.ac.cput.ruan.designpatterns.creational.abstractfactory.Animal;
import za.ac.cput.ruan.designpatterns.creational.abstractfactory.Snake;
import za.ac.cput.ruan.designpatterns.creational.abstractfactory.SpeciesFactory;
import za.ac.cput.ruan.designpatterns.creational.abstractfactory.Tyrannosaurus;

/**
 *
 * @author Ruan
 */
public class ReptileFactory extends SpeciesFactory{

    @Override
    public Animal getAnimal(String type) {
        
        if("snake".equals(type)){
            
            return new Snake();
        }
        else{
            
            return new Tyrannosaurus();
        }
    }
}
